export default Tab
function Tab(el, option = {}) {
    this.el = document.querySelector(el)
    this.title()

}
Tab.prototype.title = function () {
    let ulLiObj = this.el.querySelectorAll('ul li')
    ulLiObj.forEach((item, i) => {
        item.onmouseover = () => {
            this.el.querySelector('ul li.active').className = ''
            item.className = 'active'
            this.changeContent(i)
        }
    })
}
Tab.prototype.changeContent = function (i) {
    this.el.querySelector('ol li.active').className = ''
    this.el.querySelectorAll('ol li')[i].className = 'active'
}
